package cn.signalpha.modules.shop.controller.seller;

import cn.signalpha.common.constant.AppConstant;
import cn.signalpha.common.enums.StatusEnum;
import cn.signalpha.core.boot.ctrl.BaseController;
import cn.signalpha.core.tool.api.R;
import cn.signalpha.modules.shop.entity.GoodsServe;
import cn.signalpha.modules.shop.service.GoodsServeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;
import java.util.Map;

/**
 * 控制器
 *
 * @author signalpha
 */
@RestController
@AllArgsConstructor
@RequestMapping(AppConstant.APPLICATION_SHOP_NAME + "/sys-seller/goods/serve")
@Api(value = "商品服务", tags = "商品服务")
public class SpiGoodsServeController extends BaseController {

	private final GoodsServeService goodsServeService;

    @GetMapping("/list")
    @ApiOperation(value = "列表", notes = "")
    public R<List<GoodsServe>> list(@ApiIgnore @RequestParam Map<String, Object> params) {
		params.put("status", StatusEnum.ON.getType().toString());
        return R.data(goodsServeService.list(goodsServeService.selectGoodsServeWrapper(params)));
    }

}
